package main

import "fmt"

// 断言
func main() {
	u := UserEntity{1, "name"}
	var nullPoint interface{}
	nullPoint = u
	fmt.Println(nullPoint)

	var a UserEntity
	//a = nullPoint // 报错
	// 断言
	a = nullPoint.(UserEntity)
	fmt.Println(a)

}

type UserEntity struct {
	id   int
	name string
}
